package cn.wolfcode.wolf2w.business.api;

import cn.wolfcode.wolf2w.business.api.domain.DestinationEs;
import cn.wolfcode.wolf2w.business.api.factory.RemoteDestinationEsFallbackFactory;
import cn.wolfcode.wolf2w.common.core.constant.SecurityConstants;
import cn.wolfcode.wolf2w.common.core.constant.ServiceNameConstants;
import cn.wolfcode.wolf2w.common.core.domain.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author : 邓风来
 * @date : 2025/9/24 9:31
 */
@FeignClient(contextId = "RemoteDestinationEsService", name = ServiceNameConstants.SEARCH_SERVICE, fallbackFactory = RemoteDestinationEsFallbackFactory.class)
public interface RemoteDestinationEsService {
    @PostMapping("/search/initDestinationEs")
    R<?> initDestinationEs(@RequestBody DestinationEs destinationEs, @RequestHeader(SecurityConstants.INNER) String source);
}
